package w9;

public class Dog {
	private int size;

	public int getSize() {
		return size;
	}

	public void setSize(int size) {
		if (size < 5) {
			// RuntimeException 异常，可以不在方法头上声明
			throw new IllegalArgumentException("size < 5, " + size);
		}
		this.size = size;
	}
	


}
